package com.ruoyi.project.mydy.cinemainfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.cinemainfo.mapper.DlCinemaInfoMapper;
import com.ruoyi.project.mydy.cinemainfo.domain.DlCinemaInfo;
import com.ruoyi.project.mydy.cinemainfo.service.IDlCinemaInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 影院信息Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlCinemaInfoServiceImpl implements IDlCinemaInfoService 
{
    @Autowired
    private DlCinemaInfoMapper dlCinemaInfoMapper;

    /**
     * 查询影院信息
     * 
     * @param id 影院信息主键
     * @return 影院信息
     */
    @Override
    public DlCinemaInfo selectDlCinemaInfoById(Long id)
    {
        return dlCinemaInfoMapper.selectDlCinemaInfoById(id);
    }

    /**
     * 查询影院信息列表
     * 
     * @param dlCinemaInfo 影院信息
     * @return 影院信息
     */
    @Override
    public List<DlCinemaInfo> selectDlCinemaInfoList(DlCinemaInfo dlCinemaInfo)
    {
        return dlCinemaInfoMapper.selectDlCinemaInfoList(dlCinemaInfo);
    }

    /**
     * 新增影院信息
     * 
     * @param dlCinemaInfo 影院信息
     * @return 结果
     */
    @Override
    public int insertDlCinemaInfo(DlCinemaInfo dlCinemaInfo)
    {
        dlCinemaInfo.setCreateTime(DateUtils.getNowDate());
        return dlCinemaInfoMapper.insertDlCinemaInfo(dlCinemaInfo);
    }

    /**
     * 修改影院信息
     * 
     * @param dlCinemaInfo 影院信息
     * @return 结果
     */
    @Override
    public int updateDlCinemaInfo(DlCinemaInfo dlCinemaInfo)
    {
        return dlCinemaInfoMapper.updateDlCinemaInfo(dlCinemaInfo);
    }

    /**
     * 批量删除影院信息
     * 
     * @param ids 需要删除的影院信息主键
     * @return 结果
     */
    @Override
    public int deleteDlCinemaInfoByIds(String ids)
    {
        return dlCinemaInfoMapper.deleteDlCinemaInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除影院信息信息
     * 
     * @param id 影院信息主键
     * @return 结果
     */
    @Override
    public int deleteDlCinemaInfoById(Long id)
    {
        return dlCinemaInfoMapper.deleteDlCinemaInfoById(id);
    }
}
